package com.ruoyi.report.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

/**
 * BuyBox 报告表
 * @TableName walmart_buybox_report
 */
@TableName(value ="walmart_buybox_report")
@Data
public class WalmartBuyboxReport implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)  // 设置主键和主键策略
    private Long id;
    /**
     * 产品的 SKU（库存单位）
     */
    @TableField(value = "sku")
    private String sku;

    /**
     * 沃尔玛系统中产品的唯一标识符
     */
    @TableField(value = "item_id")
    private String itemId;

    /**
     * 产品名称
     */
    @TableField(value = "product_name")
    private String productName;

    /**
     * 产品类别
     */
    @TableField(value = "product_category")
    private String productCategory;

    /**
     * 卖家设置的商品价格
     */
    @TableField(value = "seller_item_price")
    private BigDecimal sellerItemPrice;

    /**
     * 卖家设置的运输费用（如果有）
     */
    @TableField(value = "seller_ship_price")
    private BigDecimal sellerShipPrice;

    /**
     * 标识卖家是否赢得了 BuyBox（YES/NO）
     */
    @TableField(value = "is_seller_buybox_winner")
    private String isSellerBuyboxWinner;

    /**
     * BuyBox 中的商品价格
     */
    @TableField(value = "buybox_item_price")
    private BigDecimal buyboxItemPrice;

    /**
     * BuyBox 中的运输费用（如果有）
     */
    @TableField(value = "buybox_ship_price")
    private BigDecimal buyboxShipPrice;

    /**
     * 请求唯一id
     */
    @TableField(value = "request_id")
    private String requestId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WalmartBuyboxReport other = (WalmartBuyboxReport) that;
        return (this.getSku() == null ? other.getSku() == null : this.getSku().equals(other.getSku()))
            && (this.getItemId() == null ? other.getItemId() == null : this.getItemId().equals(other.getItemId()))
            && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
            && (this.getProductCategory() == null ? other.getProductCategory() == null : this.getProductCategory().equals(other.getProductCategory()))
            && (this.getSellerItemPrice() == null ? other.getSellerItemPrice() == null : this.getSellerItemPrice().equals(other.getSellerItemPrice()))
            && (this.getSellerShipPrice() == null ? other.getSellerShipPrice() == null : this.getSellerShipPrice().equals(other.getSellerShipPrice()))
            && (this.getIsSellerBuyboxWinner() == null ? other.getIsSellerBuyboxWinner() == null : this.getIsSellerBuyboxWinner().equals(other.getIsSellerBuyboxWinner()))
            && (this.getBuyboxItemPrice() == null ? other.getBuyboxItemPrice() == null : this.getBuyboxItemPrice().equals(other.getBuyboxItemPrice()))
            && (this.getBuyboxShipPrice() == null ? other.getBuyboxShipPrice() == null : this.getBuyboxShipPrice().equals(other.getBuyboxShipPrice()))
            && (this.getRequestId() == null ? other.getRequestId() == null : this.getRequestId().equals(other.getRequestId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSku() == null) ? 0 : getSku().hashCode());
        result = prime * result + ((getItemId() == null) ? 0 : getItemId().hashCode());
        result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
        result = prime * result + ((getProductCategory() == null) ? 0 : getProductCategory().hashCode());
        result = prime * result + ((getSellerItemPrice() == null) ? 0 : getSellerItemPrice().hashCode());
        result = prime * result + ((getSellerShipPrice() == null) ? 0 : getSellerShipPrice().hashCode());
        result = prime * result + ((getIsSellerBuyboxWinner() == null) ? 0 : getIsSellerBuyboxWinner().hashCode());
        result = prime * result + ((getBuyboxItemPrice() == null) ? 0 : getBuyboxItemPrice().hashCode());
        result = prime * result + ((getBuyboxShipPrice() == null) ? 0 : getBuyboxShipPrice().hashCode());
        result = prime * result + ((getRequestId() == null) ? 0 : getRequestId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", sku=").append(sku);
        sb.append(", itemId=").append(itemId);
        sb.append(", productName=").append(productName);
        sb.append(", productCategory=").append(productCategory);
        sb.append(", sellerItemPrice=").append(sellerItemPrice);
        sb.append(", sellerShipPrice=").append(sellerShipPrice);
        sb.append(", isSellerBuyboxWinner=").append(isSellerBuyboxWinner);
        sb.append(", buyboxItemPrice=").append(buyboxItemPrice);
        sb.append(", buyboxShipPrice=").append(buyboxShipPrice);
        sb.append(", requestId=").append(requestId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}